<!--
 * @Author: 自己洗小红花
 * @Date: 2019-09-26 09:45:12
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2019-10-22 17:15:06
 * @Description: 原数据注册
 -->
<template>
  <div id="MetadataRegistration">
    <div class="MetadataRegistrationStep">
    </div>
    <!-- 树节点 -->
    <!-- 第一步 -->
    <div class="MRcontent"
         v-show="active==0">
      <el-steps :active="active"
                finish-status="success"
                align-center>
        <el-step title="第一步：选择元数据类型"
                 icon="el-icon-edit"></el-step>
      </el-steps>
      <el-tree :data="treeData"
               :props="defaultProps"
               highlight-current
               default-expand-all
               ref="treeListss"
               node-key="id"
               @node-click="nodeClick"></el-tree>
      <div class="MRfooter">
        <el-button type="primary"
                   plain
                   @click="createType">创建类型</el-button>
        <el-button type="default"
                   plain
                   @click="next">下一步</el-button>
      </div>
    </div>

    <!-- 第二步 系统元数据-->
    <div class="Step2"
         v-show="active==1 && checkData.name === '系统元数据'">
      <el-steps :active="0"
                finish-status="success"
                align-center>
        <el-step title="第二步：填写元数据表单"
                 icon="el-icon-edit"></el-step>
      </el-steps>
      <div id="Main">
        <h1>系统元数据注册</h1>
        <el-form ref="system"
                 :rules="systemRules"
                 :model="form"
                 label-position="right"
                 label-width="120px">
          <el-form-item label="系统名称："
                        prop="systemName">
            <el-input v-model="form.systemName"></el-input>
          </el-form-item>
          <el-form-item label="父级系统：">
            <el-select v-model="form.parentSystem">
              <el-option :label="item.system_name"
                         v-for="item in findAllSysData "
                         :key="item.system_id"
                         :value="item.system_id"></el-option>
            </el-select>
          </el-form-item>

          <el-form-item label="建设部门："
                        prop="buildDepartment">
            <treeselect :multiple="false"
                        :options="findOrgCatalogTreeData"
                        :default-expand-level="1"
                        :normalizer="treeProp"
                        placeholder="建设部门"
                        noOptionsText="暂无数据"
                        noResultsText="没有找到匹配结果"
                        noChildrenText="没有子节点"
                        v-model="form.buildDepartment" />
          </el-form-item>
          <el-form-item label="汇交时间："
                        prop="submitTime">
            <el-date-picker v-model="form.submitTime"
                            type="datetime"
                            value-format="yyyy-MM-dd HH:mm:ss"
                            placeholder="选择日期">
            </el-date-picker>
          </el-form-item>
          <el-form-item label="使用部门："
                        prop="useDepartment">
            <treeselect :multiple="true"
                        :options="findOrgCatalogTreeData"
                        :flat="true"
                        placeholder="使用部门"
                        :default-expand-level="1"
                        :normalizer="treeProp2"
                        noOptionsText="暂无数据"
                        noResultsText="没有找到匹配结果"
                        noChildrenText="没有子节点"
                        v-model="form.useDepartment" />
          </el-form-item>
          <el-form-item label="汇交方式："
                        prop="submitWay">
            <el-select v-model="form.submitWay">
              <el-option :label="item.dictName"
                         v-for="item in QueryDictInfoByTypeData "
                         :key="item.dictId"
                         :value="item.dictId"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="系统承建商：">
            <el-input v-model="form.systemContractor"></el-input>
          </el-form-item>
          <el-form-item label="系统密级："
                        prop="systemSecurityLevel">
            <el-select v-model="form.systemSecurityLevel">
              <el-option :label="item.dictName"
                         v-for="item in SystemIntensive"
                         :key="item.dictId"
                         :value="item.dictId"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="系统版本：">
            <el-input v-model="form.systemVersion"></el-input>
          </el-form-item>
          <el-form-item label="标签：">
            <treeselect :multiple="true"
                        :options="queryLabelTree"
                        :flat="true"
                        placeholder="标签"
                        :default-expand-level="1"
                        :normalizer="treeProp3"
                        noOptionsText="暂无数据"
                        noResultsText="没有找到匹配结果"
                        noChildrenText="没有子节点"
                        v-model="form.label" />

          </el-form-item>
          <el-form-item label="系统概述："
                        prop="systemSummary">
            <el-input v-model="form.systemSummary"
                      type="textarea"></el-input>
          </el-form-item>
          <el-form-item label="备注：">
            <el-input type="textarea"
                      placeholder="请输入内容"
                      v-model="form.remark"></el-input>
          </el-form-item>
          <el-form-item>

            <el-button plain
                       @click="active = 0">取消</el-button>
            <el-button type="primary"
                       plain
                       @click="active = 0">上一步</el-button>
            <el-button type="default"
                       plain
                       @click="onSubmit">下一步</el-button>
          </el-form-item>
        </el-form>

      </div>
    </div>
    <!-- 第二步 数据库元数据-->
    <div class="Step2"
         v-show="active==1 && checkData.name === '数据库元数据'">
      <el-steps :active="0"
                finish-status="success"
                align-center>
        <el-step title="第二步：填写元数据表单"
                 icon="el-icon-edit"></el-step>
      </el-steps>
      <div id="Main">
        <h1>数据库资源注册</h1>
        <el-form ref="database"
                 :rules="databaseRules"
                 :model="form2"
                 label-position="right"
                 label-width="140px">
          <el-form-item label="所属系统："
                        prop="systemId">
            <el-select v-model="form2.systemId">
              <el-option :label="item.system_name"
                         v-for="item in findAllSysData "
                         :key="item.system_id"
                         :value="item.system_id"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="名称：">
            <el-input v-model="form2.dbName"></el-input>
          </el-form-item>
          <el-form-item label="数据库类型："
                        prop="dbType">
            <el-select v-model="form2.dbType"
                       @change="searchDbVersion">
              <el-option :label="item.dictName"
                         v-for="item in DatabaseTypeData "
                         :key="item.dictId"
                         :value="item.dictId"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="数据库版本：">
            <el-select v-model="form2.dbVersion"
                       @change="changeDbVersion">
              <el-option :label="item.dictName"
                         v-for="item in dbVersion "
                         :key="item.dictId"
                         :value="item.dictId"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="驱动：">
            <el-select v-model="form2.dbDrive">
              <el-option :label="item.dictName"
                         v-for="item in driveDataLinkage"
                         :key="item.dictId"
                         :value="item.dictId"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="数据访问URL："
                        prop="dbUrl">
            <el-input v-model="form2.dbUrl"></el-input>
          </el-form-item>
          <el-form-item label="用户名：">
            <el-input v-model="form2.userName"></el-input>
          </el-form-item>
          <el-form-item label="密码：">

            <el-input v-model="form2.dbPwd"></el-input>
          </el-form-item>
          <el-form-item label="数据抽取方式：">
            <el-select v-model="form2.dataExtractionMethod">
              <el-option :label="item.dictName"
                         v-for="item in ExtractionMethodData "
                         :key="item.dictId"
                         :value="item.dictId"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="存储路径："
                        prop="storagePath">
            <el-input v-model="form2.storagePath"></el-input>
          </el-form-item>
          <el-form-item label="来源路径："
                        prop="sourcePath">
            <el-input v-model="form2.sourcePath"></el-input>
          </el-form-item>
          <el-form-item label="密级："
                        prop="secretLevel">
            <el-select v-model="form2.secretLevel">
              <el-option :label="item.dictName"
                         v-for="item in SystemIntensive"
                         :key="item.dictId"
                         :value="item.dictId"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="描述：">
            <el-input type="textarea"
                      placeholder="请输入内容"
                      v-model="form2.description"></el-input>
          </el-form-item>
          <el-form-item label="标签：">
            <treeselect :multiple="true"
                        :options="queryLabelTree"
                        :flat="true"
                        placeholder="标签"
                        :default-expand-level="1"
                        :normalizer="treeProp3"
                        noOptionsText="暂无数据"
                        noResultsText="没有找到匹配结果"
                        noChildrenText="没有子节点"
                        v-model="form2.label" />
          </el-form-item>
          <!-- <el-form-item label="数据现势性：">
            <el-date-picker v-model="form.dataPresence"
                            type="datetime"
                            placeholder="选择日期">
            </el-date-picker>
          </el-form-item> -->
          <el-form-item>

            <el-button plain
                       @click="active = 0">取消</el-button>
            <el-button type="primary"
                       plain
                       @click="active = 0">上一步</el-button>
            <el-button type="default"
                       plain
                       @click="onSubmit">下一步</el-button>
          </el-form-item>
        </el-form>

      </div>
    </div>
    <!-- 第三步 系统元数据  数据库元数据 -->
    <!-- <div class="Step3"
         v-show="active==2 && (checkData.name === '系统元数据' || checkData.name === '数据库元数据')">
      <el-steps :active="
         active"
                finish-status="success"
                align-center>
        <el-step title="第三步：提交注册"
                 icon="el-icon-picture"></el-step>
      </el-steps>
      注册成功
      <div>
        <el-button type="primary"
                   @click="active =0"
                   plain>完成</el-button>
      </div>

    </div> -->

    <!-- 第二步 表元数据-->
    <div class="Step2"
         v-show="active==1 && checkData.name === '表元数据'">
      <el-steps :active="0"
                finish-status="success"
                align-center>
        <el-step title="第二步：填写元数据表单"
                 icon="el-icon-edit"></el-step>
      </el-steps>
      <div>
        <h1>表资源注册</h1>
        <el-tabs value="first">
          <el-tab-pane label="基本信息"
                       name="first">
            <div id="Main">
              <el-form ref="table"
                       :rules="tableRules"
                       :model="form3"
                       label-position="right"
                       label-width="140px">
                <el-form-item label="代码："
                              prop="tableCode">
                  <el-input v-model="form3.tableCode">
                  </el-input>
                </el-form-item>
                <el-form-item label="中文名称："
                              prop="tableName">
                  <el-input v-model="form3.tableName"></el-input>
                </el-form-item>
                <el-form-item label="所属数据库："
                              prop="dbId">
                  <el-select v-model="form3.dbId"
                             @change="dbIdChange">
                    <el-option :label="item.dbname"
                               v-for="item in findAllSqlData "
                               :key="item.dbid"
                               :value="item.dbid"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="所属系统："
                              prop="systemId">
                  <el-select v-model="form3.systemId">
                    <el-option :label="item.system_name"
                               v-for="item in AffiliatedSystem"
                               :key="item.system_id"
                               :value="item.system_id"></el-option>
                  </el-select>
                </el-form-item>

                <el-form-item label="数据来源部门：">
                  <treeselect :multiple="false"
                              :options="findOrgCatalogTreeData"
                              :default-expand-level="1"
                              :normalizer="treeProp"
                              placeholder="数据来源部门"
                              noOptionsText="暂无数据"
                              noResultsText="没有找到匹配结果"
                              noChildrenText="没有子节点"
                              v-model="form3.sourceDepartment" />
                </el-form-item>
                <el-form-item label="汇交方式："
                              prop="collectWay">
                  <el-select v-model="form3.collectWay">
                    <el-option :label="item.dictName"
                               v-for="item in QueryDictInfoByTypeData "
                               :key="item.dictId"
                               :value="item.dictId"></el-option>
                  </el-select>

                </el-form-item>
                <el-form-item label="数据采集​​策略："
                              prop="dataCollectStrategy">
                  <el-select v-model="form3.dataCollectStrategy">
                    <el-option :label="item.dictName"
                               v-for="item in AcquisitionStrategyData "
                               :key="item.dictId"
                               :value="item.dictId"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="来源路径："
                              prop="sourcePath">
                  <el-input v-model="form3.sourcePath"></el-input>
                </el-form-item>
                <el-form-item label="存储路径："
                              prop="storagePath">
                  <el-input v-model="form3.storagePath"></el-input>
                </el-form-item>
                <el-form-item label="密级："
                              prop="secretLevel">
                  <el-select v-model="form3.secretLevel">
                    <el-option :label="item.dictName"
                               v-for="item in SystemIntensive"
                               :key="item.dictId"
                               :value="item.dictId"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="数据公开方式："
                              prop="dataOpenWay">
                  <el-select v-model="form3.dataOpenWay">
                    <el-option :label="item.dictName"
                               v-for="item in DataDisclosureMethodData"
                               :key="item.dictId"
                               :value="item.dictId"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="描述：">
                  <el-input v-model="form3.description"></el-input>
                </el-form-item>
                <el-form-item label="标签：">
                  <treeselect :multiple="true"
                              v-model="form3.label"
                              :options="queryLabelTree"
                              :normalizer="treeProp3"
                              :flat="true"
                              placeholder="标签"
                              :default-expand-level="1"
                              noOptionsText="暂无数据"
                              noResultsText="没有找到匹配结果"
                              noChildrenText="没有子节点" />
                </el-form-item>
                <el-form-item label="数据存储策略：">
                  <el-select v-model="form3.ruleId">
                    <el-option :label="item.dictName"
                               v-for="item in DataStorageStrategyData "
                               :key="item.dictId"
                               :value="item.dictId"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="数据组成的SQL："
                              prop="dataComposeSql">
                  <el-input placeholder="SQL"
                            v-model="form3.dataComposeSql"></el-input>
                </el-form-item>
                <el-form-item label="表类型："
                              prop="tableTypeId">
                  <el-select v-model="form3.tableTypeId">
                    <el-option :label="item.dictName"
                               v-for="item in TableTypeData "
                               :key="item.dictId"
                               :value="item.dictId"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item>
                  <!-- <el-button plain
                             @click="active = 0">取消</el-button>
                  <el-button type="primary"
                             plain
                             @click="active = 0">上一步</el-button>
                  <el-button type="default"
                             plain
                             @click="onSubmit">下一步</el-button> -->
                </el-form-item>
              </el-form>

            </div>
          </el-tab-pane>
          <el-tab-pane label="字段元数据"
                       name="second">
            <div class="right">
              <div class="container">
                <div class="view">
                  <div class="top tr">
                    <el-button type="primary"
                               size="small"
                               @click="addTableData">添加</el-button>
                  </div>
                  <div class="table">
                    <el-scrollbar :native="false"
                                  tag="section"
                                  class="el-scroll">
                      <el-table :data="insertTableData"
                                :header-cell-style="{background:'#eef1f6',color:'#606266'}"
                                element-loading-text="数据加载中"
                                element-loading-spinner="el-icon-loading"
                                element-loading-background="rgba(21, 29, 54, 0.8)"
                                border
                                highlight-current-row>
                        <el-table-column align="center"
                                         :show-overflow-tooltip="true"
                                         prop="fieldEname"
                                         label="英文名称"></el-table-column>
                        <el-table-column align="center"
                                         :show-overflow-tooltip="true"
                                         prop="fieldName"
                                         label="中文名称"></el-table-column>
                        <el-table-column align="center"
                                         :show-overflow-tooltip="true"
                                         prop="fieldType"
                                         label="字段类型"></el-table-column>
                        <el-table-column align="center"
                                         :show-overflow-tooltip="true"
                                         prop="fieldLength"
                                         label="字段长度"></el-table-column>
                        <el-table-column align="center"
                                         :show-overflow-tooltip="true"
                                         prop="quote"
                                         label="指标"></el-table-column>
                        <el-table-column align="center"
                                         :show-overflow-tooltip="true"
                                         prop="dataCreateRules"
                                         label="数据生成规则"></el-table-column>
                        <!-- <el-table-column align="center"
                                         :show-overflow-tooltip="true"
                                         prop="label"
                                         label="标签"></el-table-column> -->
                        <el-table-column align="center"
                                         :show-overflow-tooltip="true"
                                         prop="registerTime"
                                         label="入库时间"
                                         width="150">
                          <template slot-scope="scope">
                            <el-date-picker v-model="scope.row.registerTime"
                                            type="date"
                                            placeholder="选择日期"
                                            disabled>
                            </el-date-picker>
                          </template>
                        </el-table-column>
                        <el-table-column align="center"
                                         :show-overflow-tooltip="true"
                                         prop="isShow"
                                         label="是否展示">
                          <template slot-scope="scope">
                            <el-checkbox v-model="scope.row.isShow">发布时展示</el-checkbox>
                          </template>
                        </el-table-column>
                        <el-table-column align="center"
                                         :show-overflow-tooltip="true"
                                         prop="description"
                                         label="描述"></el-table-column>
                        <el-table-column label="操作"
                                         width="300"
                                         align="center">
                          <template slot-scope="scope">
                            <!-- <el-button size="mini"
                                       type="primary"
                                       @click="showList(scope.row)">查看</el-button>
                            <el-button size="mini"
                                       type="success"
                                       @click="showList(scope.row)">修改</el-button> -->
                            <el-button size="mini"
                                       type="danger"
                                       @click="deleteInsertTable(scope)">删除</el-button>

                          </template>
                        </el-table-column>
                      </el-table>
                    </el-scrollbar>
                  </div>
                  <div class="bottom">
                    <el-button plain
                               @click="active = 0">取消</el-button>
                    <el-button type="primary"
                               plain
                               @click="active = 0">上一步</el-button>
                    <el-button type="default"
                               plain
                               @click="onSubmit">下一步</el-button>
                  </div>
                </div>
              </div>
            </div>
          </el-tab-pane>
        </el-tabs>
      </div>
    </div>
    <!-- 第三步：表元数据 发布 -->
    <!-- <div class="Step2"
         v-show="active==2 && checkData.name === '表元数据'">
      <el-steps :active="0"
                finish-status="success"
                align-center>
        <el-step title="第三步：发布"
                 icon="el-icon-picture"></el-step>
      </el-steps>
      <el-tabs value="first">
        <el-tab-pane label="基本信息"
                     name="first">
          <div id="Main">
            <el-form ref="form"
                     :model="insertTableForm"
                     label-position="right"
                     label-width="120px">
              <el-form-item label="数据组成SQL：">
                <el-input v-model="insertTableForm.dataComposeSql"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="描述：">
                <el-input v-model="insertTableForm.description"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="注册时间：">
                <el-date-picker v-model="insertTableForm.registerTime"
                                type="date"
                                disabled>
                </el-date-picker>
              </el-form-item>
              <el-form-item label="来源路径：">
                <el-date-picker v-model="insertTableForm.sourcePath"
                                type="date"
                                disabled>
                </el-date-picker>
              </el-form-item>
              <el-form-item label="代码：">
                <el-input v-model="insertTableForm.tableCode"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="中文名称：">
                <el-input v-model="insertTableForm.tableName"
                          disabled>
                </el-input>
              </el-form-item>
              <el-form-item label="表类型：">
                <el-input v-model="insertTableForm.tableTypeId"
                          disabled>
                </el-input>
              </el-form-item>
              <el-form-item></el-form-item>
            </el-form>
          </div>
        </el-tab-pane>
        <el-tab-pane label="传入参数"
                     name="second">
          <div class="right">
            <div class="container">
              <div class="view">
                <div class="table">
                  <el-scrollbar :native="false"
                                tag="section"
                                class="el-scroll">
                    <el-table :data="insertTableData"
                              :header-cell-style="{background:'#eef1f6',color:'#606266'}"
                              element-loading-text="数据加载中"
                              element-loading-spinner="el-icon-loading"
                              element-loading-background="rgba(21, 29, 54, 0.8)"
                              border
                              highlight-current-row>
                      <el-table-column align="center"
                                       :show-overflow-tooltip="true"
                                       prop="fieldEname"
                                       label="英文名称"></el-table-column>
                      <el-table-column align="center"
                                       :show-overflow-tooltip="true"
                                       prop="fieldName"
                                       label="中文名称"></el-table-column>
                      <el-table-column align="center"
                                       :show-overflow-tooltip="true"
                                       prop="fieldType"
                                       label="字段类型"></el-table-column>
                      <el-table-column align="center"
                                       :show-overflow-tooltip="true"
                                       prop="fieldLength"
                                       label="字段长度"></el-table-column>
                      <el-table-column align="center"
                                       :show-overflow-tooltip="true"
                                       prop="quote"
                                       label="指标"></el-table-column>
                      <el-table-column align="center"
                                       :show-overflow-tooltip="true"
                                       prop="dataCreateRules"
                                       label="数据生成规则"></el-table-column>
                      <el-table-column align="center"
                                       :show-overflow-tooltip="true"
                                       prop="registerTime"
                                       label="入库时间"
                                       width="150">
                        <template slot-scope="scope">
                          <el-date-picker v-model="scope.row.registerTime"
                                          type="date"
                                          placeholder="选择日期"
                                          disabled>
                          </el-date-picker>
                        </template>
                      </el-table-column>
                      <el-table-column align="center"
                                       :show-overflow-tooltip="true"
                                       prop="isShow"
                                       label="是否展示">
                        <template slot-scope="scope">
                          <el-checkbox v-model="scope.row.isShow">发布时展示</el-checkbox>
                        </template>
                      </el-table-column>
                      <el-table-column align="center"
                                       :show-overflow-tooltip="true"
                                       prop="description"
                                       label="描述"></el-table-column>
                    </el-table>
                  </el-scrollbar>
                </div>
              </div>
            </div>
          </div>
        </el-tab-pane>
        <div>
          <el-button type="primary">修改发布属性</el-button>
          <el-button @click="active++">跳过</el-button>
          <el-button type=" primary"
                     @click="active--">上一步</el-button>
          <el-button type="primary"
                     @click="active++">下一步</el-button>
        </div>
      </el-tabs>
    </div> -->
    <!-- 第二步 文件服务器元数据-->
    <div class="Step2"
         v-show="active==1 && checkData.name === '文件服务器元数据'">
      <el-steps :active="0"
                finish-status="success"
                align-center>
        <el-step title="第二步：填写元数据表单"
                 icon="el-icon-edit"></el-step>
      </el-steps>
      <div id="Main">
        <h1>文件服务器资源注册</h1>
        <el-form ref="fileServer"
                 :rules="fileServerRules"
                 :model="fileServerForm"
                 label-position="right"
                 label-width="135px">
          <el-form-item label="名称："
                        prop="fileServerName">
            <el-input v-model="fileServerForm.fileServerName"></el-input>
          </el-form-item>
          <el-form-item label="数据来源部门："
                        prop="orgId">
            <treeselect :multiple="false"
                        v-model="fileServerForm.orgId"
                        :options="findOrgCatalogTreeData"
                        :normalizer="treeProp"
                        placeholder="数据来源部门"
                        :default-expand-level="1"
                        noOptionsText="暂无数据"
                        noResultsText="没有找到匹配结果"
                        noChildrenText="没有子节点" />
          </el-form-item>
          <el-form-item label="所属系统："
                        prop="systemId">
            <el-select v-model="fileServerForm.systemId">
              <el-option :label="item.system_name"
                         v-for="item in findAllSysData "
                         :key="item.system_id"
                         :value="item.system_id"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="业务功能："
                        prop="businessFunction">
            <el-input v-model="fileServerForm.businessFunction"></el-input>
          </el-form-item>
          <el-form-item label="文件服务器URL："
                        prop="url">
            <el-input v-model="fileServerForm.url"></el-input>
          </el-form-item>
          <el-form-item label="账号：">
            <el-input v-model="fileServerForm.accountNumber"></el-input>
          </el-form-item>
          <el-form-item label="密码：">
            <el-input v-model="fileServerForm.fileServerPassword"></el-input>
          </el-form-item>
          <el-form-item label="汇交方式："
                        prop="collectWay">
            <el-select v-model="fileServerForm.collectWay">
              <el-option :label="item.dictName"
                         v-for="item in QueryDictInfoByTypeData "
                         :key="item.dictId"
                         :value="item.dictId"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="数据抽取方式：">
            <el-select v-model="fileServerForm.dataExtractionMethod">
              <el-option :label="item.dictName"
                         v-for="item in ExtractionMethodData "
                         :key="item.dictId"
                         :value="item.dictId"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="来源路径："
                        prop="sourcePath">
            <el-input v-model="fileServerForm.sourcePath"></el-input>
          </el-form-item>
          <el-form-item label="存储路径："
                        prop="storagePath">
            <el-input placeholder="请输入内容"
                      v-model="fileServerForm.storagePath"></el-input>
          </el-form-item>
          <el-form-item label="密级："
                        prop="secretLevel">
            <el-select v-model="fileServerForm.secretLevel">
              <el-option :label="item.dictName"
                         v-for="item in SystemIntensive"
                         :key="item.dictId"
                         :value="item.dictId"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="标签：">
            <treeselect :multiple="true"
                        v-model="fileServerForm.label"
                        :options="queryLabelTree"
                        :normalizer="treeProp3"
                        :flat="true"
                        placeholder="标签"
                        :default-expand-level="1"
                        noOptionsText="暂无数据"
                        noResultsText="没有找到匹配结果"
                        noChildrenText="没有子节点" />
          </el-form-item>
          <el-form-item label="描述：">
            <el-input type="textarea"
                      placeholder="请输入内容"
                      v-model="fileServerForm.description"></el-input>
          </el-form-item>
          <el-form-item>

            <el-button plain
                       @click="active = 0">取消</el-button>
            <el-button type="primary"
                       plain
                       @click="active = 0">上一步</el-button>
            <el-button type="default"
                       plain
                       @click="onSubmit">下一步</el-button>
          </el-form-item>
        </el-form>

      </div>
    </div>
    <!-- 第三步：文件服务器元数据 发布 -->
    <!-- <div class="Step2"
         v-show="active==2 && checkData.name === '文件服务器元数据'">
      <el-steps :active="0"
                finish-status="success"
                align-center>
        <el-step title="第三步：发布"
                 icon="el-icon-picture"></el-step>
      </el-steps>
      <el-tabs value="first">
        <el-tab-pane label="基本信息"
                     name="first">
          <div id="Main">
            <el-form ref="form"
                     :model="findFileServerData"
                     label-position="right"
                     label-width="120px">
              <el-form-item label="名称：">
                <el-input v-model="findFileServerData.file_server_name"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="业务功能：">
                <el-input v-model="findFileServerData.business_function"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="文件服务器URL：">
                <el-input v-model="findFileServerData.url"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="注册时间：">
                <el-date-picker v-model="findFileServerData.register_time"
                                type="date"
                                disabled>
                </el-date-picker>
              </el-form-item>
              <el-form-item label="账号：">
                <el-input v-model="findFileServerData.account_number"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="密码：">
                <el-input v-model="findFileServerData.file_server_password"
                          disabled></el-input>
              </el-form-item>

              <el-form-item label="来源路径：">
                <el-input v-model="findFileServerData.source_path"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="存储路径：">
                <el-input v-model="findFileServerData.storage_path"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="描述：">
                <el-input v-model="findFileServerData.description"
                          disabled></el-input>
              </el-form-item>
              <el-form-item>

              </el-form-item>
            </el-form>
          </div>
        </el-tab-pane>
        <div>
          <el-button type="primary">修改发布属性</el-button>
          <el-button @click="active++">跳过</el-button>
          <el-button type=" primary"
                     @click="active--">上一步</el-button>
          <el-button type="primary"
                     @click="active++">下一步</el-button>
        </div>
      </el-tabs>
    </div> -->
    <!-- 第二步 文件元数据-->
    <div class="Step2"
         v-show="active==1 && checkData.name === '文件元数据'">
      <el-steps :active="0"
                finish-status="success"
                align-center>
        <el-step title="第二步：填写元数据表单"
                 icon="el-icon-edit"></el-step>
      </el-steps>
      <div id="Main">
        <h1>文件资源注册</h1>
        <el-form ref="file"
                 :rules="fileRules"
                 :model="fileForm"
                 label-position="right"
                 label-width="140px">
          <el-form-item label="文件名："
                        prop="fileName">
            <el-input v-model="fileForm.fileName"></el-input>
          </el-form-item>
          <el-form-item label="所属系统："
                        prop="systemId">
            <el-select v-model="fileForm.systemId"
                       @change="changeSystemId">
              <el-option :label="item.system_name"
                         v-for="item in findAllSysData "
                         :key="item.system_id"
                         :value="item.system_id"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="所属文件服务器："
                        prop="fileServerId">
            <el-select v-model="fileForm.fileServerId">
              <el-option :label="item.file_server_name"
                         v-for="item in findFileServerBySystemIdData"
                         :key="item.file_server_id"
                         :value="item.file_server_id"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="文件类型：">
            <el-input v-model="fileForm.fileType"></el-input>
          </el-form-item>
          <el-form-item label="文件大小：">
            <el-input v-model="fileForm.fileSize"
                      type="number">
              <el-button slot="append">kb</el-button>
            </el-input>
          </el-form-item>
          <el-form-item label="访问地址："
                        prop="accessAddress">
            <el-input v-model="fileForm.accessAddress"></el-input>
          </el-form-item>
          <el-form-item label="密码：">
            <el-input v-model="fileForm.password"></el-input>
          </el-form-item>
          <el-form-item label="数据抽取方式：">
            <el-select v-model="fileForm.dataExtractionMethod">
              <el-option :label="item.dictName"
                         v-for="item in ExtractionMethodData "
                         :key="item.dictId"
                         :value="item.dictId"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="来源路径："
                        prop="sourcePath">
            <el-input v-model="fileForm.sourcePath"></el-input>
          </el-form-item>
          <el-form-item label="存储路径："
                        prop="storagePath">
            <el-input v-model="fileForm.storagePath"></el-input>
          </el-form-item>
          <el-form-item label="数据密级：">
            <el-select v-model="fileForm.secretLevel">
              <el-option :label="item.dictName"
                         v-for="item in SystemIntensive"
                         :key="item.dictId"
                         :value="item.dictId"></el-option>
            </el-select>
          </el-form-item>
          <!-- <el-form-item label="现势性：">
            <el-date-picker v-model="fileForm.dataPresence"
                            type="datetime"
                            placeholder="选择日期">
            </el-date-picker>
          </el-form-item> -->
          <el-form-item label="文件概述：">
            <el-input placeholder="请输入内容"
                      v-model="fileForm.fileSummary"></el-input>
          </el-form-item>
          <el-form-item label="文件用途：">
            <el-input placeholder="请输入内容"
                      v-model="fileForm.filePurpose"></el-input>
          </el-form-item>
          <el-form-item label="共享方式："
                        prop="shareWay">
            <el-select v-model="fileForm.shareWay">
              <el-option :label="item.dictName"
                         v-for="item in SharingMethod"
                         :key="item.dictId"
                         :value="item.dictId"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="标签：">
            <treeselect :multiple="true"
                        :options="queryLabelTree"
                        :flat="true"
                        :default-expand-level="1"
                        :normalizer="treeProp3"
                        placeholder="标签"
                        noOptionsText="暂无数据"
                        noResultsText="没有找到匹配结果"
                        noChildrenText="没有子节点"
                        v-model="fileForm.label" />
          </el-form-item>
          <el-form-item label="使用授权：">
            <treeselect :multiple="true"
                        v-model="fileForm.authorizedUnit"
                        :options="findOrgCatalogTreeData"
                        :normalizer="treeProp2"
                        :flat="true"
                        placeholder="使用授权"
                        :default-expand-level="1"
                        noOptionsText="暂无数据"
                        noResultsText="没有找到匹配结果"
                        noChildrenText="没有子节点" />
          </el-form-item>
          <el-form-item>

            <el-button plain
                       @click="active = 0">取消</el-button>
            <el-button type="primary"
                       plain
                       @click="active = 0">上一步</el-button>
            <el-button type="default"
                       plain
                       @click="onSubmit">下一步</el-button>
          </el-form-item>
        </el-form>

      </div>
    </div>
    <!-- 第三步：文件元数据 发布 -->
    <!-- <div class="Step2"
         v-show="active==2 && checkData.name === '文件元数据'">
      <el-steps :active="0"
                finish-status="success"
                align-center>
        <el-step title="第三步：发布"
                 icon="el-icon-picture"></el-step>
      </el-steps>
      <el-tabs value="first">
        <el-tab-pane label="基本信息"
                     name="first">
          <div id="Main">
            <el-form ref="form"
                     :model="fileIdData"
                     label-position="right"
                     label-width="120px">
              <el-form-item label="文件名：">
                <el-input v-model="fileIdData.file_name"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="文件类型：">
                <el-input v-model="fileIdData.file_type"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="文件大小：">
                <el-input v-model="fileIdData.file_size"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="访问地址：">
                <el-input v-model="fileIdData.access_address"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="密码：">
                <el-input v-model="fileIdData.password"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="来源路径：">
                <el-input v-model="fileIdData.source_path"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="存储路径：">
                <el-input v-model="fileIdData.storage_path"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="现势性：">
                <el-date-picker v-model="fileIdData.data_presence"
                                type="datetime"
                                disabled>
                </el-date-picker>
              </el-form-item>

              <el-form-item label="文件概述：">
                <el-input v-model="fileIdData.file_summary"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="文件用途：">
                <el-input v-model="fileIdData.file_purpose"
                          disabled></el-input>
              </el-form-item>
              <el-form-item>

              </el-form-item>
            </el-form>
          </div>
        </el-tab-pane>
        <div>
          <el-button type="primary">修改发布属性</el-button>
          <el-button @click="active++">跳过</el-button>
          <el-button type=" primary"
                     @click="active--">上一步</el-button>
          <el-button type="primary"
                     @click="active++">下一步</el-button>
        </div>
      </el-tabs>
    </div> -->
    <!-- 第二步 接口服务器元数据-->
    <div class="Step2"
         v-show="active==1 && checkData.name === '接口服务器元数据'">
      <el-steps :active="0"
                finish-status="success"
                align-center>
        <el-step title="第二步：填写元数据表单"
                 icon="el-icon-edit"></el-step>
      </el-steps>
      <div id="Main">
        <h1>接口服务器资源注册</h1>
        <el-form ref="InterfaceServer"
                 :rules="InterfaceServerRules"
                 :model="interfaceServer"
                 label-position="right"
                 label-width="135px">
          <el-form-item label="名称："
                        prop="interfaceName">
            <el-input v-model="interfaceServer.interfaceName"></el-input>
          </el-form-item>
          <el-form-item label="数据来源部门："
                        prop="sourceDepartment">
            <treeselect :multiple="false"
                        v-model="interfaceServer.sourceDepartment"
                        :options="findOrgCatalogTreeData"
                        :normalizer="treeProp"
                        placeholder="数据来源部门"
                        :default-expand-level="1"
                        noOptionsText="暂无数据"
                        noResultsText="没有找到匹配结果"
                        noChildrenText="没有子节点" />
          </el-form-item>
          <el-form-item label="所属系统："
                        prop="systemId">
            <el-select v-model="interfaceServer.systemId">
              <el-option :label="item.system_name"
                         v-for="item in findAllSysData "
                         :key="item.system_id"
                         :value="item.system_id"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="业务功能："
                        prop="businessFunctions">
            <el-input v-model="interfaceServer.businessFunctions"
                      placeholder="实现什么"></el-input>
          </el-form-item>
          <el-form-item label="接口服务器URL："
                        prop="accessAddress">
            <el-input placeholder="请输入服务器URL"
                      v-model="interfaceServer.accessAddress">
            </el-input>
          </el-form-item>
          <el-form-item label="账号：">
            <el-input v-model="interfaceServer.accountName"></el-input>
          </el-form-item>
          <el-form-item label="密码：">
            <el-input v-model="interfaceServer.accountPassword"></el-input>
          </el-form-item>
          <el-form-item label="汇交方式："
                        prop="collectWay">
            <el-select v-model="interfaceServer.collectWay">
              <el-option :label="item.dictName"
                         v-for="item in QueryDictInfoByTypeData "
                         :key="item.dictId"
                         :value="item.dictId"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="数据抽取方式：">
            <el-select v-model="interfaceServer.dataExtractionMethod">
              <el-option :label="item.dictName"
                         v-for="item in ExtractionMethodData "
                         :key="item.dictId"
                         :value="item.dictId"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="来源路径："
                        prop="sourcePath">
            <el-input v-model="interfaceServer.sourcePath"></el-input>
          </el-form-item>
          <el-form-item label="存储路径："
                        prop="storagePath">
            <el-input v-model="interfaceServer.storagePath"></el-input>
          </el-form-item>
          <el-form-item label="密级："
                        prop="secretLevel">
            <el-select v-model="interfaceServer.secretLevel">
              <el-option :label="item.dictName"
                         v-for="item in SystemIntensive"
                         :key="item.dictId"
                         :value="item.dictId"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="标签：">
            <treeselect :multiple="true"
                        :options="queryLabelTree"
                        :flat="true"
                        :default-expand-level="1"
                        :normalizer="treeProp3"
                        placeholder="标签"
                        noOptionsText="暂无数据"
                        noResultsText="没有找到匹配结果"
                        noChildrenText="没有子节点"
                        v-model="interfaceServer.label" />
          </el-form-item>
          <el-form-item label="描述：">
            <el-input type="textarea"
                      placeholder="请输入内容"
                      v-model="interfaceServer.description"></el-input>
          </el-form-item>
          <el-form-item>
            <el-button plain
                       @click="active = 0">取消</el-button>
            <el-button type="primary"
                       plain
                       @click="active = 0">上一步</el-button>
            <el-button type="default"
                       plain
                       @click="onSubmit">下一步</el-button>
          </el-form-item>
        </el-form>
      </div>
    </div>
    <!-- 第三步：接口服务器元数据 发布 -->
    <!-- <div class="Step2"
         v-show="active==2 && checkData.name === '接口服务器元数据'">
      <el-steps :active="0"
                finish-status="success"
                align-center>
        <el-step title="第三步：发布"
                 icon="el-icon-picture"></el-step>
      </el-steps>
      <el-tabs value="first">
        <el-tab-pane label="基本信息"
                     name="first">
          <div id="Main">
            <el-form ref="form"
                     :model="InterfaceServerFormData"
                     label-position="right"
                     label-width="120px">
              <el-form-item label="对接方式：">
                <el-input v-model="InterfaceServerFormData.collect_way"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="接口名称：">
                <el-input v-model="InterfaceServerFormData.interface_name"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="描述：">
                <el-input v-model="InterfaceServerFormData.description"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="注册时间：">
                <el-date-picker v-model="InterfaceServerFormData.register_time"
                                type="date"
                                disabled>
                </el-date-picker>
              </el-form-item>
              <el-form-item label="用户名：">
                <el-input v-model="InterfaceServerFormData.account_password"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="密码：">
                <el-input v-model="InterfaceServerFormData.account_password"
                          disabled></el-input>
              </el-form-item>

              <el-form-item label="密级：">
                <el-select v-model="InterfaceServerFormData.secret_level">
                  <el-option :label="item.dictName"
                             v-for="item in SystemIntensive"
                             :key="item.dictId"
                             :value="item.dictId"></el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="来源路径：">
                <el-input v-model="InterfaceServerFormData.source_path"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="业务功能：">
                <el-input v-model="InterfaceServerFormData.business_functions"
                          disabled></el-input>
              </el-form-item>
              <el-form-item>

              </el-form-item>
            </el-form>
          </div>
        </el-tab-pane>
        <div>
          <el-button type="primary">修改发布属性</el-button>
          <el-button @click="active++">跳过</el-button>
          <el-button type=" primary"
                     @click="active--">上一步</el-button>
          <el-button type="primary"
                     @click="active++">下一步</el-button>
        </div>
      </el-tabs>
    </div> -->
    <!-- 第二步 接口元数据-->
    <div class="Step2"
         v-show="active==1 && checkData.name === '接口元数据'">
      <el-steps :active="0"
                finish-status="success"
                align-center>
        <el-step title="第二步：填写元数据表单"
                 icon="el-icon-edit"></el-step>
      </el-steps>
      <el-tabs value="first">
        <el-tab-pane label="基本信息"
                     name="first">
          <div id="Main">
            <h1>接口资源注册</h1>
            <el-form ref="Interface"
                     :rules="InterfaceRules"
                     :model="InterfaceForm"
                     label-position="right"
                     label-width="140px">
              <el-form-item label="接口名称："
                            prop="interfaceName">
                <el-input v-model="InterfaceForm.interfaceName"></el-input>
              </el-form-item>
              <el-form-item label="所属系统："
                            prop="systemId">
                <el-select v-model="InterfaceForm.systemId"
                           @change="changeInterfaceForm">
                  <el-option :label="item.system_name"
                             v-for="item in findAllSysData"
                             :key="item.system_id"
                             :value="item.system_id"></el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="所属接口服务器："
                            prop="interfaceServerId">
                <el-select v-model="InterfaceForm.interfaceServerId">
                  <el-option :label="item.interface_name"
                             v-for="item in findAllInterfaceServerDataSearch"
                             :key="item.interface_server_id"
                             :value="item.interface_server_id"></el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="接口类型：">
                <el-select v-model="InterfaceForm.interfaceType">
                  <el-option :label="item.dictName"
                             v-for="item in InterfaceTypeData "
                             :key="item.dictId"
                             :value="item.dictId"></el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="传输方式：">
                <el-input v-model="InterfaceForm.transmissionWay"></el-input>
              </el-form-item>
              <el-form-item label="访问地址："
                            prop="accessAddress">
                <el-input placeholder="请输入访问地址URL"
                          v-model="InterfaceForm.accessAddress">
                  <el-button slot="append"
                             icon="el-icon-link"
                             size="small"></el-button>
                </el-input>
              </el-form-item>
              <el-form-item label="密码：">
                <el-input v-model="InterfaceForm.accountPassword"></el-input>
              </el-form-item>
              <el-form-item label="来源路径：">
                <el-input v-model="InterfaceForm.sourcePath"></el-input>
              </el-form-item>
              <el-form-item label="存储路径："
                            prop="storagePath">
                <el-input v-model="InterfaceForm.storagePath"></el-input>
              </el-form-item>
              <el-form-item label="数据密级："
                            prop="secretLevel">
                <el-select v-model="InterfaceForm.secretLevel">
                  <el-option :label="item.dictName"
                             v-for="item in SystemIntensive"
                             :key="item.dictId"
                             :value="item.dictId"></el-option>
                </el-select>
              </el-form-item>
              <!-- <el-form-item label="现势性：">
                <el-date-picker v-model="InterfaceForm.dataPresence"
                                type="datetime"
                                placeholder="选择日期">
                </el-date-picker>
              </el-form-item> -->
              <el-form-item label="接口概述：">
                <el-input type="textarea"
                          placeholder="请输入内容"
                          v-model="InterfaceForm.interfaceSummary"></el-input>
              </el-form-item>
              <el-form-item label="接口状态：">
                <el-input placeholder="请输入内容"
                          v-model="InterfaceForm.interfaceStatus"></el-input>
              </el-form-item>
              <el-form-item label="标签：">
                <treeselect :multiple="true"
                            :options="queryLabelTree"
                            :flat="true"
                            :default-expand-level="1"
                            :normalizer="treeProp3"
                            placeholder="标签"
                            noOptionsText="暂无数据"
                            noResultsText="没有找到匹配结果"
                            noChildrenText="没有子节点"
                            v-model="InterfaceForm.label" />
              </el-form-item>
              <el-form-item label="使用授权："
                            prop="permissionId">
                <treeselect :multiple="true"
                            v-model="InterfaceForm.permissionId"
                            :options="findOrgCatalogTreeData"
                            :normalizer="treeProp2"
                            :flat="true"
                            placeholder="使用授权"
                            :default-expand-level="1"
                            noOptionsText="暂无数据"
                            noResultsText="没有找到匹配结果"
                            noChildrenText="没有子节点" />
              </el-form-item>
              <el-form-item>
                <el-form-item>
                  <el-button plain
                             @click="active = 0">取消</el-button>
                  <el-button type="primary"
                             plain
                             @click="active = 0">上一步</el-button>
                  <el-button type="default"
                             plain
                             @click="onSubmit">下一步</el-button>
                </el-form-item>
              </el-form-item>
            </el-form>
          </div>
        </el-tab-pane>
        <el-tab-pane label="传入参数"
                     name="second">
          <div class="right">
            <div class="container">
              <div class="view">
                <div class="top tr">
                  <el-button type="primary"
                             size="small"
                             @click="addInterfaceTableData">添加</el-button>
                </div>
                <div class="table">
                  <el-scrollbar :native="false"
                                tag="section"
                                class="el-scroll">
                    <el-table :data="InterfaceTableData"
                              :header-cell-style="{background:'#eef1f6',color:'#606266'}"
                              element-loading-text="数据加载中"
                              element-loading-spinner="el-icon-loading"
                              element-loading-background="rgba(21, 29, 54, 0.8)"
                              border
                              highlight-current-row>
                      <el-table-column align="center"
                                       :show-overflow-tooltip="true"
                                       prop="id"
                                       label="编号"></el-table-column>
                      <el-table-column align="center"
                                       :show-overflow-tooltip="true"
                                       prop="params"
                                       label="参数"></el-table-column>
                      <el-table-column align="center"
                                       :show-overflow-tooltip="true"
                                       prop="parameterSpecification"
                                       label="参数说明"></el-table-column>
                      <el-table-column label="操作"
                                       width="200"
                                       align="center">
                        <template slot-scope="scope">
                          <el-button size="mini"
                                     type="danger"
                                     palin
                                     @click="deleteInterfaceTableData(scope)">删除</el-button>
                        </template>
                      </el-table-column>
                    </el-table>
                  </el-scrollbar>
                </div>
                <div class="bottom">
                  <el-button plain
                             @click="active = 0">取消</el-button>
                  <el-button type="primary"
                             plain
                             @click="active = 0">上一步</el-button>
                  <el-button type="default"
                             plain
                             @click="onSubmit">下一步</el-button>
                </div>

              </div>
            </div>
          </div>
        </el-tab-pane>
      </el-tabs>

    </div>
    <!-- 第三步：接口元数据 发布 -->
    <!-- <div class="Step2"
         v-show="active==2 && checkData.name === '接口元数据'">
      <el-steps :active="0"
                finish-status="success"
                align-center>
        <el-step title="第三步：发布"
                 icon="el-icon-picture"></el-step>
      </el-steps>
      <el-tabs value="first">
        <el-tab-pane label="基本信息"
                     name="first">
          <div id="Main">
            <el-form ref="form"
                     :model="fileIdData"
                     label-position="right"
                     label-width="120px">
              <el-form-item label="访问地址：">
                <el-input v-model="fileIdData.access_address"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="密码：">
                <el-input v-model="fileIdData.account_password"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="现势性：">
                <el-date-picker v-model="InterfaceFormData.data_presence"
                                type="date"
                                disabled>
                </el-date-picker>
              </el-form-item>
              <el-form-item label="接口状态：">
                <el-date-picker v-model="InterfaceFormData.interface_status"
                                type="date"
                                disabled>
                </el-date-picker>
              </el-form-item>
              <el-form-item label="接口概述：">
                <el-date-picker v-model="InterfaceFormData.interface_summary"
                                type="date"
                                disabled>
                </el-date-picker>
              </el-form-item>
              <el-form-item label="数据密级：">
                <el-input v-model="InterfaceFormData.data_presence"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="接口名称：">
                <el-date-picker v-model="InterfaceFormData.interface_name"
                                type="date"
                                disabled>
                </el-date-picker>
              </el-form-item>
              <el-form-item label="来源路径：">
                <el-input v-model="InterfaceFormData.source_path"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="传输方式：">
                <el-input v-model="InterfaceFormData.transmission_way"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="来源路径：">
                <el-input v-model="InterfaceFormData.source_path"
                          disabled></el-input>
              </el-form-item>
              <el-form-item label="注册时间：">
                <el-date-picker v-model="InterfaceFormData.register_time"
                                type="date"
                                disabled>
                </el-date-picker>
              </el-form-item>
              <el-form-item></el-form-item>

            </el-form>
          </div>
        </el-tab-pane>
        <el-tab-pane label="传入参数"
                     name="second">
          <div class="right">
            <div class="container">
              <div class="view">
                <div class="table">
                  <el-scrollbar :native="false"
                                tag="section"
                                class="el-scroll">
                    <el-table :data="InterfaceTableData"
                              :header-cell-style="{background:'#eef1f6',color:'#606266'}"
                              element-loading-text="数据加载中"
                              element-loading-spinner="el-icon-loading"
                              element-loading-background="rgba(21, 29, 54, 0.8)"
                              border
                              highlight-current-row>
                      <el-table-column align="center"
                                       :show-overflow-tooltip="true"
                                       prop="id"
                                       label="编号"></el-table-column>
                      <el-table-column align="center"
                                       :show-overflow-tooltip="true"
                                       prop="params"
                                       label="参数"></el-table-column>
                      <el-table-column align="center"
                                       :show-overflow-tooltip="true"
                                       prop="parameterSpecification"
                                       label="参数说明"></el-table-column>
                    </el-table>
                  </el-scrollbar>
                </div>
              </div>
            </div>
          </div>
        </el-tab-pane>
        <div>
          <el-button type="primary">修改发布属性</el-button>
          <el-button @click="active++">跳过</el-button>
          <el-button type=" primary"
                     @click="active--">上一步</el-button>
          <el-button type="primary"
                     @click="active++">下一步</el-button>
        </div>
      </el-tabs>
    </div> -->
    <!-- 第四步 接口元数据  接口服务器元数据 表元数据 文件服务器元数据  文件元数据-->
    <!-- <div class="Step3"
         v-show="active==3 && (checkData.name === '接口服务器元数据' || checkData.name === '接口元数据'|| checkData.name === '表元数据'|| checkData.name === '文件服务器元数据'|| checkData.name === '文件元数据')">
      <el-steps :active="active"
                finish-status="success"
                align-center>
        <el-step title="第四步：提交注册"
                 icon="el-icon-picture"></el-step>
      </el-steps>
      注册成功
      <div>
        <el-button type="primary"
                   @click="carryOut"
                   plain>完成</el-button>
      </div>

    </div> -->
    <!-- //  第三步发布全部屏蔽 -->
    <div class="Step3"
         v-show="active==2">
      <el-steps :active="active"
                finish-status="success"
                align-center>
        <el-step title="第三步：提交注册"
                 icon="el-icon-picture"></el-step>
      </el-steps>
      注册成功
      <div>
        <el-button type="primary"
                   @click="carryOut"
                   plain>完成</el-button>
      </div>

    </div>
    <!-- --------------------------------弹窗-------------------- -->
    <!-- //添加表单元数据 -->
    <el-dialog title="添加表单元数据"
               :visible.sync="addInsertTableS"
               width="45%"
               id="dialog">
      <el-scrollbar :native="false"
                    tag="section"
                    class="el-scroll">
        <el-form :model="InsertTableDataForm"
                 label-width="120px"
                 label-position="right">
          <el-form-item label="英文名称：">
            <el-input v-model="InsertTableDataForm.fieldEname"></el-input>
          </el-form-item>
          <el-form-item label="中文名称：">
            <el-input v-model="InsertTableDataForm.fieldName"></el-input>
          </el-form-item>
          <el-form-item label="字段类型：">
            <el-select v-model="InsertTableDataForm.fieldType">
              <el-option :label="item.dictName"
                         v-for="item in PreliminaryTypeData "
                         :key="item.dictId"
                         :value="item.dictId"></el-option>
            </el-select>
            <!-- <el-input v-model="InsertTableDataForm.fieldType"></el-input> -->
          </el-form-item>
          <el-form-item label="字段长度：">
            <el-input v-model="InsertTableDataForm.fieldLength"></el-input>
          </el-form-item>
          <el-form-item label="指标：">
            <el-input v-model="InsertTableDataForm.quote"></el-input>
          </el-form-item>
          <el-form-item label="数据生成规则：">
            <el-input v-model="InsertTableDataForm.dataCreateRules"></el-input>
          </el-form-item>
          <el-form-item label="标签：">
            <treeselect :multiple="true"
                        :options="queryLabelTree"
                        :flat="true"
                        :default-expand-level="1"
                        :normalizer="treeProp3"
                        placeholder="标签"
                        noOptionsText="暂无数据"
                        noResultsText="没有找到匹配结果"
                        noChildrenText="没有子节点"
                        v-model="InsertTableDataForm.label" />
          </el-form-item>
          <el-form-item label="入库时间：">
            <el-date-picker v-model="InsertTableDataForm.registerTime"
                            type="datetime"
                            value-format="yyyy-MM-dd"
                            placeholder="选择日期">
            </el-date-picker>
          </el-form-item>
          <el-form-item label="描述：">
            <el-input v-model="InsertTableDataForm.description"></el-input>
          </el-form-item>
          <el-form-item label="授权：">
            <treeselect :multiple="true"
                        v-model="InsertTableDataForm.permissionId"
                        :options="findOrgCatalogTreeData"
                        :normalizer="treeProp2"
                        :flat="true"
                        :default-expand-level="1"
                        placeholder="授权"
                        noOptionsText="暂无数据"
                        noResultsText="没有找到匹配结果"
                        noChildrenText="没有子节点" />
          </el-form-item>
          <el-form-item>
            <el-button type="primary"
                       @click="addTableDataSubmit">确 定</el-button>
          </el-form-item>
        </el-form>
        <!-- <el-card class="box-card">
          <div slot="header"
               class="clearfix">
            <span>影响规则</span>
            <el-button style="float: right"
                       type="primary"
                       size="small"
                       @click="addInfluenceTableRuleData">添加</el-button>
          </div>
          <el-table :data="InfluenceTableRuleData"
                    :header-cell-style="{background:'#eef1f6',color:'#606266'}"
                    element-loading-text="数据加载中"
                    element-loading-spinner="el-icon-loading"
                    element-loading-background="rgba(21, 29, 54, 0.8)"
                    border
                    highlight-current-row>
            <el-table-column align="center"
                             :show-overflow-tooltip="true"
                             prop="bpId"
                             label="业务流程"></el-table-column>
            <el-table-column align="center"
                             :show-overflow-tooltip="true"
                             prop="nodeId"
                             label="业务节点"></el-table-column>
            <el-table-column align="center"
                             :show-overflow-tooltip="true"
                             prop="brId"
                             label="业务规则"></el-table-column>
            <el-table-column label="操作"
                             align="center">
              <template slot-scope="scope">
                <el-button size="mini"
                           type="danger"
                           @click="deleteInsertTable(scope)">删除</el-button>

              </template>
            </el-table-column>
          </el-table>
        </el-card> -->
      </el-scrollbar>

    </el-dialog>
    <!-- // 添加规则 -->
    <el-dialog title="影响规则添加"
               :visible.sync="addInfluenceTableRuleDataShow"
               width="30%">
      <el-form :model="InfluenceTableRuleDataForm"
               label-width="120px"
               id="InfluenceTableRuleData"
               label-position="right">
        <el-form-item label="业务流程：">
          <el-select v-model="InfluenceTableRuleDataForm.bpId"
                     @change="changeBusinessProcessData">
            <el-option :label="item.busiProceName"
                       v-for="item in BusinessProcessData "
                       :key="item.busiProceId"
                       :value="item.versionId"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="流程节点：">
          <el-select v-model="InfluenceTableRuleDataForm.nodeId">
            <el-option :label="item.nodeName"
                       v-for="item in ProcessNodeData"
                       :key="item.nodeId"
                       :value="item.nodeId"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="业务规则：">
          <el-select v-model="InfluenceTableRuleDataForm.brId">
            <el-option :label="item.nodeName"
                       v-for="item in BusinessRulesData"
                       :key="item.nodeId"
                       :value="item.nodeId"></el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <span slot="footer"
            class="dialog-footer">
        <el-button @click="addInfluenceTableRuleDataShow = false">取 消</el-button>
        <el-button type="primary"
                   @click="addInfluenceTableRuleDataSubmit">确 定</el-button>
      </span>
    </el-dialog>
    <el-dialog title="添加传入参数"
               :visible.sync="InterfaceTableDataS"
               width="30%">
      <el-form ref="form"
               :model="InterfaceTableDataForm"
               label-position="right"
               id="soid"
               label-width="120px">
        <el-form-item label="参数：">
          <el-input v-model="InterfaceTableDataForm.params"></el-input>
        </el-form-item>
        <el-form-item label="参数说明：">
          <el-input v-model="InterfaceTableDataForm.parameterSpecification"></el-input>
        </el-form-item>
        <el-form-item>
          <el-button type="primary"
                     @click="InterfaceTableDataS = false">取消</el-button>
          <el-button type="primary"
                     @click="InterfaceTableDataSubmit">确认</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>
  </div>
</template>
<script>
import step3 from "./components/step3";
import MetadataRegister from "./components/metadataRegister";
import DatabaseResource from "./components/databaseResource";
import formMetadata from "./components/formMetadata";
import metadataRegistrationApi from "@/httpUtils/ExternalManagement/metadataRegistration"
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
export default {
  name: "MetadataRegistrationView",
  components: {
    MetadataRegister,
    DatabaseResource,
    formMetadata,
    step3,
    Treeselect
  },
  props: {
    treeData: {
      type: Array,
      default: []
    },
    defaultProps: {
      type: Object,
      default: () => { }
    },
    findAllSysData: {
      type: Array,
      default: []
    },
    SystemIntensive: {
      type: Array,
      default: []
    },
    exchangeSystemData: {
      type: Array,
      default: []
    },
    findOrgCatalogTreeData: {
      type: Array,
      default: []
    },
    queryLabelTree: {
      type: Array,
      default: []
    },
    DatabaseTypeData: {
      type: Array,
      default: []
    },
    driveData: {
      type: Array,
      default: []
    },
    driveDataLinkage: {
      type: Array,
      default: []
    },
    findAllInterfaceServerDataSearch: {
      type: Array,
      default: []
    },
    SharingMethod: {
      type: Array,
      default: []
    },
    ExtractionMethodData: {
      type: Array,
      default: []
    },
    AffiliatedSystem: {
      type: Array,
      default: []
    },
    findAllSqlData: {
      type: Array,
      default: []
    },
    QueryDictInfoByTypeData: {
      type: Array,
      default: []
    },
    AcquisitionStrategyData: {
      type: Array,
      default: []
    },
    DataStorageStrategyData: {
      type: Array,
      default: []
    },
    TableTypeData: {
      type: Array,
      default: []
    },
    DataDisclosureMethodData: {
      type: Array,
      default: []
    },
    tableData: {
      type: Array,
      default: () => { }
    },
    dbVersion: {
      type: Array,
      default: () => { }
    },
    PreliminaryTypeData: {
      type: Array,
      default: () => { }
    },
    BusinessProcessData: {
      type: Array,
      default: () => { }
    },
    ProcessNodeData: {
      type: Array,
      default: () => { }
    },
    BusinessRulesData: {
      type: Array,
      default: () => { }
    },
    findAllInterfaceServerData: {
      type: Array,
      default: () => { }
    },
    InterfaceTypeData: {
      type: Array,
      default: () => { }
    },
    findFileServerBySystemIdData: {
      type: Array,
      default: () => { }
    }
  },
  data () {
    return {
      systemRules: {
        systemName: [
          { required: true, message: '系统名称', trigger: 'blur' },
        ],
        buildDepartment: [
          { required: true, message: '建设部门', trigger: 'blur' },
        ],
        useDepartment: [
          { required: true, message: '使用部门', trigger: 'blur' },
        ],
        submitTime: [
          { required: true, message: '汇交时间', trigger: 'blur' },
        ],
        submitWay: [
          { required: true, message: '汇交方式', trigger: 'blur' },
        ],
        systemSecurityLevel: [
          { required: true, message: '系统密级', trigger: 'blur' },
        ],
        systemSummary: [
          { required: true, message: '系统概述', trigger: 'blur' },
        ]
      },
      databaseRules: {
        systemId: [
          { required: true, message: '所属系统', trigger: 'blur' },
        ],
        dbType: [
          { required: true, message: '数据库类型', trigger: 'blur' },
        ],
        dbVersion: [
          { required: true, message: '数据库版本', trigger: 'blur' },
        ],
        dbUrl: [
          { required: true, message: '数据访问URL', trigger: 'blur' },
        ],
        dataExtractionMethod: [
          { required: true, message: '数据抽取方式', trigger: 'blur' },
        ],
        sourcePath: [
          { required: true, message: '来源路径', trigger: 'blur' },
        ],
        storagePath: [
          { required: true, message: '存储路径', trigger: 'blur' },
        ],
        secretLevel: [
          { required: true, message: '密级', trigger: 'blur' },
        ]
      },
      tableRules: {
        tableCode: [
          { required: true, message: '代码', trigger: 'blur' },
        ],
        tableName: [
          { required: true, message: '中文名称', trigger: 'blur' },
        ],
        dbId: [
          { required: true, message: '所属数据库', trigger: 'blur' },
        ],
        systemId: [
          { required: true, message: '所属系统', trigger: 'blur' },
        ],
        collectWay: [
          { required: true, message: '汇交方式', trigger: 'blur' },
        ],
        dataCollectStrategy: [
          { required: true, message: '数据采集​​策略', trigger: 'blur' },
        ],
        sourcePath: [
          { required: true, message: '来源路径', trigger: 'blur' },
        ],
        storagePath: [
          { required: true, message: '存储路径', trigger: 'blur' },
        ],
        secretLevel: [
          { required: true, message: '密级', trigger: 'blur' },
        ],
        dataOpenWay: [
          { required: true, message: '数据公开方式', trigger: 'blur' },
        ],
        dataComposeSql: [
          { required: true, message: '数据组成的SQL', trigger: 'blur' },
        ],
        tableTypeId: [
          { required: true, message: '表类型', trigger: 'blur' },
        ]
      },
      fileServerRules: {
        fileServerName: [
          { required: true, message: '名称', trigger: 'blur' },
        ],
        orgId: [
          { required: true, message: '数据来源部门', trigger: 'blur' },
        ],
        systemId: [
          { required: true, message: '所属系统', trigger: 'blur' },
        ],
        businessFunction: [
          { required: true, message: '业务功能', trigger: 'blur' },
        ],
        url: [
          { required: true, message: '文件服务器URL', trigger: 'blur' },
        ],
        collectWay: [
          { required: true, message: '汇交方式', trigger: 'blur' },
        ],
        dataExtractionMethod: [
          { required: true, message: '数据抽取方式', trigger: 'blur' },
        ],
        sourcePath: [
          { required: true, message: '来源路径', trigger: 'blur' },
        ],
        storagePath: [
          { required: true, message: '存储路径', trigger: 'blur' },
        ],
        secretLevel: [
          { required: true, message: '密级', trigger: 'blur' },
        ]
      },
      fileRules: {
        fileName: [
          { required: true, message: '文件名', trigger: 'blur' },
        ],
        systemId: [
          { required: true, message: '所属系统', trigger: 'blur' },
        ],
        fileServerId: [
          { required: true, message: '所属文件服务器', trigger: 'blur' },
        ],
        accessAddress: [
          { required: true, message: '访问地址', trigger: 'blur' },
        ],
        dataExtractionMethod: [
          { required: true, message: '数据抽取方式', trigger: 'blur' },
        ],
        sourcePath: [
          { required: true, message: '来源路径', trigger: 'blur' },
        ],
        storagePath: [
          { required: true, message: '存储路径', trigger: 'blur' },
        ],
        shareWay: [
          { required: true, message: '共享方式', trigger: 'blur' },
        ],
      },
      InterfaceServerRules: {
        interfaceName: [
          { required: true, message: '名称', trigger: 'blur' },
        ],
        sourceDepartment: [
          { required: true, message: '数据来源部门', trigger: 'blur' },
        ],
        systemId: [
          { required: true, message: '所属系统', trigger: 'blur' },
        ],
        businessFunctions: [
          { required: true, message: '业务功能', trigger: 'blur' },
        ],
        accessAddress: [
          { required: true, message: '文件服务器URL', trigger: 'blur' },
        ],
        collectWay: [
          { required: true, message: '汇交方式', trigger: 'blur' },
        ],
        dataExtractionMethod: [
          { required: true, message: '数据抽取方式', trigger: 'blur' },
        ],
        dataExtractionMethod: [
          { required: true, message: '数据抽取方式', trigger: 'blur' },
        ],
        sourcePath: [
          { required: true, message: '来源路径', trigger: 'blur' },
        ],
        secretLevel: [
          { required: true, message: '存储路径', trigger: 'blur' },
        ]
      },
      InterfaceRules: {
        interfaceName: [
          { required: true, message: '接口名称', trigger: 'blur' },
        ],
        systemId: [
          { required: true, message: '所属系统', trigger: 'blur' },
        ],
        interfaceServerId: [
          { required: true, message: '所属接口服务器', trigger: 'blur' },
        ],
        accessAddress: [
          { required: true, message: '访问地址', trigger: 'blur' },
        ],
        storagePath: [
          { required: true, message: '存储路径', trigger: 'blur' },
        ],
        secretLevel: [
          { required: true, message: '数据密级', trigger: 'blur' },
        ],
        permissionId: [
          { required: true, message: '使用授权', trigger: 'blur' },
        ]
      },
      active: 0,
      checkData: {
        child: [],
        father_id: "1",
        id: "2",
        info: null,
        name: "系统元数据"
      },
      addInsertTableS: false,
      addInfluenceTableRuleDataShow: false,
      interfaceServer: {
        interfaceName: '',
        sourceDepartment: null,
        systemId: '',
        businessFunctions: '',
        accessAddress: '',
        accountName: '',
        accountPassword: '',
        collectWay: '',
        dataExtractionMethod: '',
        sourcePath: '',
        storagePath: '',
        secretLevel: '',
        label: null,
        description: ''
      },
      InterfaceForm: {
        interfaceName: '',
        systemId: '',
        interfaceServerId: '',
        interfaceType: '',
        transmissionWay: '',
        accessAddress: '',
        accountPassword: '',
        sourcePath: '',
        storagePath: '',
        secretLevel: '',
        dataPresence: '',
        interfaceSummary: '',
        interfaceStatus: '',
        label: null,
        permissionId: null,
      },
      InterfaceTableData: [

      ],
      InterfaceTableDataS: false,
      InterfaceTableDataForm: {
        params: '',
        parameterSpecification: ''
      },
      data: [],
      InterfaceFormTree: {

      },
      InterfaceFormTreeTableData: [],
      insertTableData: [],
      InsertTableDataForm: {
        fieldEname: '',
        fieldName: '',
        fieldType: '',
        fieldLength: '',
        quote: '',
        dataCreateRules: '',
        label: [],
        registerTime: '',
        description: '',
        permissionId: []
      },
      InsertTableDataFormCopy: {
        fieldEname: '',
        fieldName: '',
        fieldType: '',
        fieldLength: '',
        quote: '',
        dataCreateRules: '',
        label: [],
        registerTime: '',
        description: '',
        permissionId: []
      },
      form: {
        systemName: '',
        parentSystem: '',
        buildDepartment: null,
        submitTime: '',
        useDepartment: null,
        submitWay: '',
        systemContractor: '',
        systemSecurityLevel: '',
        systemVersion: '',
        label: null,
        systemSummary: '',
        remark: '',
      },
      form2: {
        systemId: '',
        dbName: '',
        dbType: '',
        dbVersion: '',
        dbDrive: '',
        dbUrl: '',
        userName: '',
        dbPwd: '',
        dataExtractionMethod: '',
        sourcePath: '',
        storagePath: '',
        secretLevel: '',
        description: '',
        label: null,
        dataPresence: ''
      },
      form3: {
        tableCode: '',
        tableCode: '',
        tableName: '',
        systemId: '',
        dbId: '',
        sourceDepartment: null,
        collectWay: '',
        dataCollectStrategy: '',
        sourcePath: '',
        storagePath: '',
        secretLevel: '',
        dataOpenWay: '',
        description: '',
        label: null,
        ruleId: '',
        dataComposeSql: '',
        tableTypeId: ''
      },
      InfluenceRuleData: {
        bpId: "",
        brId: "",
        nodeId: ""
      },
      InfluenceTableRuleData: [
        {
          bpId: "1",
          brId: "2",
          nodeId: "3"
        }
      ],
      InfluenceTableRuleDataForm: {

      },
      insertInterfaceServerId: '',
      InterfaceServerTableData: [],
      InterfaceServerFormData: {

      },
      insertInterServerId: '',
      InterfaceFormData: {},
      insertTableForm: {},
      fileServerForm: {
        fileServerName: '',
        orgId: null,
        systemId: '',
        businessFunction: '',
        url: '',
        accountNumber: '',
        fileServerPassword: '',
        collectWay: '',
        dataExtractionMethod: '',
        sourcePath: '',
        storagePath: '',
        secretLevel: '',
        label: null,
        description: '',
      },
      findFileServerData: {},
      fileForm: {
        fileName: '',
        systemId: '',
        fileServerId: '',
        fileType: '',
        fileSize: '',
        accessAddress: '',
        password: '',
        dataExtractionMethod: '',
        sourcePath: '',
        storagePath: '',
        secretLevel: '',
        dataPresence: '',
        fileSummary: '',
        filePurpose: '',
        shareWay: '',
        label: null,
        authorizedUnit: null,
      },
      fileIdData: {}
    };
  },
  mounted () {

  },
  methods: {
    treeProp (node) {
      return {
        id: node.id,
        label: node.name,
        children: node.child
      };
    },
    treeProp2 (node) {
      return {
        id: node.id,
        label: node.name,
        children: node.child
      };
    },
    treeProp3 (node) {
      return {
        id: node.id,
        label: node.name,
        children: node.child
      };
    },
    // 点击下一步
    next () {
      this.active++
    },
    normalizer (node) {
      return {
        id: node.id,
        label: node.name,
        children: node.child,
      }
    },
    changeSystemId (id) {
      console.log(id)
      this.fileForm.fileServerId = ''
      this.$emit('changeSystemId', id)
    },
    dbIdChange (data) {
      console.log(data)
      this.form3.systemId = ''
      this.$emit('dbIdChange', data)
    },
    //  点击完成按钮
    carryOut () {
      this.$message.success('注册成功')
      this.active = 0
    },
    //  修改时间格式
    // changeTime (date) {
    //   console.log(date)
    //   var d = date
    //   d = d.getFullYear() + '-' + (d.getMonth() + 1) + '-' + d.getDate();
    //   this.form.submitTime = d
    // },
    //  点击下一步提交表单数据
    onSubmit () {
      //  处理数据
      //  系统元数据注册
      if (this.checkData.name === '系统元数据') {
        this.$refs.system.validate((valid) => {
          if (valid) {
            let obj = Object.assign({}, this.form)
            obj.buildDepartment = JSON.stringify(obj.buildDepartment).replace(/["|\[|\]]/g, '')
            obj.label = JSON.stringify(obj.label).replace(/["|\[|\]]/g, '')
            obj.useDepartment = JSON.stringify(obj.useDepartment).replace(/["|\[|\]]/g, '')
            console.log(obj)
            metadataRegistrationApi.insertSystem(obj).then(res => {
              if (res.data.code == 200) {
                this.$message.success(res.data.message)
                this.form = {
                  systemName: '',
                  parentSystem: '',
                  buildDepartment: null,
                  submitTime: '',
                  useDepartment: null,
                  submitWay: '',
                  systemContractor: '',
                  systemSecurityLevel: '',
                  systemVersion: '',
                  label: null,
                  systemSummary: '',
                  remark: '',
                }
                this.active++
              } else {
                this.$message.error('服务器错误')
              }
            })
          }
        })
      } else if (this.checkData.name === '数据库元数据') {
        this.$refs.database.validate((valid) => {
          if (valid) {
            let obj = Object.assign({}, this.form2)
            obj.label = JSON.stringify(obj.label).replace(/["|\[|\]]/g, '')
            metadataRegistrationApi.insertSql(obj).then(res => {
              if (res.data.code == 200) {
                this.$message.success(res.data.message)
                this.form2 = {
                  systemId: '',
                  dbName: '',
                  dbType: '',
                  dbVersion: '',
                  dbDrive: '',
                  dbUrl: '',
                  userName: '',
                  dbPwd: '',
                  dataExtractionMethod: '',
                  sourcePath: '',
                  storagePath: '',
                  secretLevel: '',
                  description: '',
                  label: null,
                  dataPresence: ''
                }
                this.active++
              } else {
                this.$message.error('服务器错误')
              }
            })
          }
        })
        console.log(this.form2)
      } else if (this.checkData.name === '表元数据') {
        this.$refs.table.validate((valid) => {
          if (valid) {
            let obj = Object.assign({}, this.form3)
            obj.label = JSON.stringify(obj.label).replace(/["|\[|\]]/g, '')
            obj.sourceDepartment = JSON.stringify(obj.sourceDepartment).replace(/["|\[|\]]/g, '')
            let data = {
              ...obj,
              listFiled: this.insertTableData,
              listRule: []
            }
            metadataRegistrationApi.insertTable(data).then(res => {
              if (res.data.code == 200) {
                // this.$message.success(res.data.message)
                this.form3 = {
                  tableCode: '',
                  tableCode: '',
                  tableName: '',
                  systemId: '',
                  dbId: '',
                  sourceDepartment: null,
                  collectWay: '',
                  dataCollectStrategy: '',
                  sourcePath: '',
                  storagePath: '',
                  secretLevel: '',
                  dataOpenWay: '',
                  description: '',
                  label: null,
                  ruleId: '',
                  dataComposeSql: '',
                  tableTypeId: ''
                }
                this.active++
                metadataRegistrationApi.findAllTab({ tabId: res.data.data }).then(res => {
                  this.insertTableForm = res.data.data[0]
                })
              } else {
                this.$message.error('服务器错误')
              }
            })
          }
        })
      } else if (this.checkData.name === '接口服务器元数据') {
        this.$refs.InterfaceServer.validate((valid) => {
          if (valid) {
            console.log('接口服务器元数据', this.interfaceServer)
            let obj = Object.assign({}, this.interfaceServer)
            obj.label = JSON.stringify(obj.label).replace(/["|\[|\]]/g, '')
            obj.sourceDepartment = JSON.stringify(obj.sourceDepartment).replace(/["|\[|\]]/g, '')
            metadataRegistrationApi.insertInterfaceServer(obj).then(res => {
              if (res.data.code == 200) {
                this.interfaceServer = {
                  interfaceName: '',
                  sourceDepartment: null,
                  systemId: '',
                  businessFunctions: '',
                  accessAddress: '',
                  accountName: '',
                  accountPassword: '',
                  collectWay: '',
                  dataExtractionMethod: '',
                  sourcePath: '',
                  storagePath: '',
                  secretLevel: '',
                  label: null,
                  description: ''
                },
                  this.active++
                this.insertInterfaceServerId = res.data.data
                //  查询到表格数据
                metadataRegistrationApi.findInterfaceServer({ InterfaceServerId: this.insertInterfaceServerId }).then(res => {
                  // console.log(res)
                  // this.InterfaceServerTableData = res.data.data[0]
                  // console.log(this.InterfaceServerFormData)
                  this.InterfaceServerFormData = res.data.data[0]
                })
              } else {
                this.$message.error('服务器错误')
              }
            })
          }
        })

        // console.log(this.form3)
      } else if (this.checkData.name === '接口元数据') {
        this.$refs.Interface.validate((valid) => {
          if (valid) {
            console.log('接口元数据', this.InterfaceForm)
            console.log('接口元数据表格数据', this.InterfaceTableData)
            let obj = Object.assign({}, this.InterfaceForm)
            obj.label = JSON.stringify(obj.label).replace(/["|\[|\]]/g, '')
            obj.permissionId = JSON.stringify(obj.permissionId).replace(/["|\[|\]]/g, '')
            let data = {
              ...obj,
              listParam: this.InterfaceTableData
            }
            metadataRegistrationApi.insertInterface(data).then(res => {
              if (res.data.code == 200) {
                // this.$message.success(res.data.message)
                this.InterfaceForm = {
                  interfaceName: '',
                  systemId: '',
                  interfaceServerId: '',
                  interfaceType: '',
                  transmissionWay: '',
                  accessAddress: '',
                  accountPassword: '',
                  sourcePath: '',
                  storagePath: '',
                  secretLevel: '',
                  dataPresence: '',
                  interfaceSummary: '',
                  interfaceStatus: '',
                  label: null,
                  permissionId: null,
                }
                this.active++
                this.insertInterServerId = res.data.data
                //  查询到表单数据
                metadataRegistrationApi.findInterface({ InterfaceId: this.insertInterServerId }).then(res => {
                  console.log(res)
                  this.InterfaceFormData = res.data.data[0]
                })
              } else {
                this.$message.error('服务器错误')
              }
            })
          }
        })

        // console.log(this.form3)
      } else if (this.checkData.name === '文件服务器元数据') {
        this.$refs.fileServer.validate((valid) => {
          if (valid) {
            console.log('文件服务器元数据', this.fileServerForm)
            let obj = Object.assign({}, this.fileServerForm)
            obj.label = JSON.stringify(obj.label).replace(/["|\[|\]]/g, '')
            obj.orgId = JSON.stringify(obj.orgId).replace(/["|\[|\]]/g, '')
            obj.systemId = JSON.stringify(obj.systemId).replace(/["|\[|\]]/g, '')
            metadataRegistrationApi.insertFileService(obj).then(res => {
              if (res.data.code == 200) {
                this.fileServerForm = {
                  fileServerName: '',
                  orgId: null,
                  systemId: '',
                  businessFunction: '',
                  url: '',
                  accountNumber: '',
                  fileServerPassword: '',
                  collectWay: '',
                  dataExtractionMethod: '',
                  sourcePath: '',
                  storagePath: '',
                  secretLevel: '',
                  label: null,
                  description: '',
                }
                this.active++
                //  查询到表单数据
                metadataRegistrationApi.findFileServer({ findFileServerId: res.data.data }).then(res => {
                  console.log(res)
                  this.findFileServerData = res.data.data[0]
                })
              } else {
                this.$message.error('服务器错误')
              }
            })
          }
        })

      } else if (this.checkData.name === '文件元数据') {
        this.$refs.file.validate((valid) => {
          if (valid) {
            console.log('文件元数据', this.fileForm)
            let obj = Object.assign({}, this.fileForm)
            obj.authorizedUnit = JSON.stringify(obj.authorizedUnit).replace(/["|\[|\]]/g, '')
            obj.label = JSON.stringify(obj.label).replace(/["|\[|\]]/g, '')
            metadataRegistrationApi.insertFile(obj).then(res => {
              if (res.data.code == 200) {
                this.active++
                this.fileForm = {
                  fileName: '',
                  systemId: '',
                  fileServerId: '',
                  fileType: '',
                  fileSize: '',
                  accessAddress: '',
                  password: '',
                  dataExtractionMethod: '',
                  sourcePath: '',
                  storagePath: '',
                  secretLevel: '',
                  dataPresence: '',
                  fileSummary: '',
                  filePurpose: '',
                  shareWay: '',
                  label: null,
                  authorizedUnit: null,
                }
                //  查询到表单数据
                metadataRegistrationApi.findFile({ fileId: res.data.data }).then(res => {
                  console.log(res)
                  this.fileIdData = res.data.data[0]
                })
              } else {
                this.$message.error('服务器错误')
              }
            })
          }
        })
      } else {
        console.log(this.checkData)
      }

    },
    deleteInsertTable (data) {
      console.log(data.$index)//  下标
      this.insertTableData.splice(data.$index, 1)
    },
    addInterfaceTableData () {
      this.InterfaceTableDataS = true
    },
    InterfaceTableDataSubmit () {
      this.InterfaceTableDataS = false
      console.log(this.InterfaceTableDataForm)
      this.InterfaceTableDataForm.id = this.InterfaceTableData.length + 1
      let obj = Object.assign({}, this.InterfaceTableDataForm)
      this.$message.success('添加参数成功')
      this.InterfaceTableData.push(obj)
      this.InterfaceTableDataForm = {}
      console.log('表格数据', this.InterfaceTableData)
    },
    deleteInterfaceTableData (data) {
      console.log(data.$index)
      this.InterfaceTableData.splice(data.$index, 1)
    },
    changeDbVersion (data) {
      console.log(data)  //  id
      this.form2.dbDrive = ''
      this.$emit('changeDbVersion', data)
    },
    // treeProp (node) {
    //   return {
    //     id: node.id,
    //     label: node.name,
    //     children: node.child,
    //   }
    // },
    //  --------------------------------弹窗操作---------------------
    // 点击完成按钮
    nssd () {
      this.active = 0
      this.$router.go(0)
    },
    //  表单元数据注册点击添加按钮
    addTableData () {
      this.addInsertTableS = true
    },
    //  点击确认按钮
    addTableDataSubmit () {
      console.log('form', this.InsertTableDataForm)
      console.log('table', this.insertTableData)

      this.InsertTableDataForm.label = JSON.stringify(this.InsertTableDataForm.label).replace(/["|\[|\]]/g, '')
      this.InsertTableDataForm.permissionId = JSON.stringify(this.InsertTableDataForm.permissionId).replace(/["|\[|\]]/g, '')
      let xx = Object.assign({}, this.InsertTableDataForm);
      this.InsertTableDataForm = {
        fieldEname: '',
        fieldName: '',
        fieldType: '',
        fieldLength: '',
        quote: '',
        dataCreateRules: '',
        label: [],
        registerTime: '',
        description: '',
        permissionId: []
      }
      this.insertTableData.push(xx)
      this.$message.success('插入成功')
      this.addInsertTableS = false
    },
    //  根据数据库类型获取数据库版本
    searchDbVersion (data) {
      this.form2.dbVersion = ""
      this.$emit('searchDbVersion', data)
    },
    //  添加规则
    addInfluenceTableRuleData () {
      this.addInfluenceTableRuleDataShow = true
    },
    //  业务流程--获取流程节点数据
    changeBusinessProcessData (data) {
      console.log('业务流程id', data)
      // this.InfluenceTableRuleDataForm.nodeId = ""
      this.$emit('changeBusinessProcessData', data)
    },
    //业务流程--业务规则
    changenodeId (data) {
      console.log('流程节点', data)
      this.$emit('changenodeId', data)
    },
    //  添加规则点击确定
    addInfluenceTableRuleDataSubmit () {
      console.log(this.InfluenceTableRuleDataForm)
      // this.addInfluenceTableRuleDataShow = false

    },
    createType () {
      // this.$router.push({ name: `metadataType` })
      this.$router.push({
        path: `/${_routerPath.routerName}/metadataType`
      });
    },
    //  点击节点触发事件
    nodeClick (data) {
      if (data.child !== undefined && data.child.length !== 0) return
      console.log('点击节点的数据', data)
      this.checkData = data
    },
    changeNum (data) {
      if (data.length > 1) {
        data = [data[data.length - 1]]
      }
      console.log(data)
      this.form.name3 = JSON.stringify(data)
    },
    changeNum2 (data) {
      if (data.length > 1) {
        data = [data[data.length - 1]]
      }
      console.log(data)
      this.form.name5 = JSON.stringify(data)
    },
    changeNum3 (data) {
      if (data.length > 1) {
        data = [data[data.length - 1]]
      }
      console.log(data)
      this.form.name10 = JSON.stringify(data)
    },
    //  所属系统联动所属接口服务器
    changeInterfaceForm (data) {
      console.log(data)
      this.InterfaceForm.interfaceServerId = ""
      this.$emit('changeInterfaceForm', data)
    }
  }
};
</script>
<style lang="less" scoped>
@import url("./MetadataRegistration");
.el-form {
  .flex();
  flex-wrap: wrap;
  .el-form-item {
    font-size: 14px;
    width: 50%;
    box-sizing: border-box;
    align-items: center;
    text-align: center;
    /deep/ .el-input {
      width: 200px;
    }
    /deep/ .el-textarea {
      width: 200px;
    }
    /deep/ label {
      font-weight: 700;
    }
  }
}
#Main {
  width: 70%;
  margin: 0 auto;
}

// .el-form {
//   width: 100%;
//   .el-form-item {
//     .jc-b();
//     /deep/ label {
//       min-width: 0px !important;
//     }
//     /deep/ input {
//       flex: 1;
//       // width: 100%;
//     }
//     /deep/ .el-form-item__content {
//       margin-left: 0px !important;
//     }
//   }

//   .el-form-item:last-child {
//     width: 100%;
//   }
// }
</style>
